<?php
/**
 * @author Charles EDOU NZE <charlesen@live.fr>
 * @copyright Copyright 2011, Charles EDOU NZE
 * @version 1.0
 */
?>
<p id="footer">
    Copyright &copy; 2011 - <a href="#" title="http://www.chinguitel.mr/" accesskey="5">Chinguitel</a>
</p>
<hr />
<div>
    <?php
// Librairie wurfl
    require_once '../lib/terawurfl/TeraWurfl.php';
    $wurflObj = new TeraWurfl();
    $wurflObj->getDeviceCapabilitiesFromAgent();
//    $data = $wurflObj->capabilities;
//    echo "<pre>";
//    var_export($data);
//    echo "</pre>";
    $nom = $wurflObj->getDeviceCapability('marketing_name');
    $marque = $wurflObj->getDeviceCapability('brand_name');
    $modele = $wurflObj->getDeviceCapability('model_name');
    $os = $wurflObj->getDeviceCapability('device_os') . " " . $wurflObj->getDeviceCapability('device_os_version');

    if (empty($nom)) {
        $nom = "non renseigné";
    }
    if (empty($marque)) {
        $marque = "non renseigné";
    }
    if (empty($modele)) {
        $modele = "non renseigné";
    }
    if (empty($os)) {
        $os = "non renseigné";
    }
    ?>
    <h2>Caractéristiques de l'appareil :</h2>
    <ul>
        <li>Nom : <?php echo $nom; ?></li>
        <li>Marque : <?php echo $marque; ?></li>
        <li>Modèle : <?php echo $modele; ?></li>
        <li>OS : <?php echo $os; ?></li>
    </ul>
</div> <!-- Caractéristiques de l'appareil -->
</div>
</body>
</html>
